﻿using Sylan.Common.Util;

namespace Eps.Ai.Common
{
    public class Config
    {
        public static IniHelper INI = new IniHelper(SysHelper.PATH_ROOT + @"\config.ini");
        // =====================common
        // 日志级别 1:debug, 2:info, 3:warn, 4:error
        public static int LOG_LEVEL = int.Parse(INI.ReadValue("common", "loglevel", "2"));

        // =====================device
        public static string DEVICE_SN = INI.ReadValue("device", "DEVICE_SN", "0001");//设备编号
        public static int DEVICE_MODEL = int.Parse(INI.ReadValue("device", "DEVICE_MODEL", "1"));//设备型号
        public static string DEVICE_MAC = INI.ReadValue("device", "DEVICE_MAC", "ABC");//设备MAC地址
        public static string PLC_COM = INI.ReadValue("device", "PLCCOM", "COM14");
        public static string AUTOSHOT_COM = INI.ReadValue("device", "AUTOSHOTCOM", "COM3");

        public static int PLC_HEARTBEAT_INTEVAL = int.Parse(INI.ReadValue("device", "PLC_HEARTBEAT_INTEVAL", "5000"));//PLC心跳监测频率（单位：毫秒）

        public static string APP_VERSION = INI.ReadValue("device", "APP_VERSION", "V1.0");//软件版本号
        public static string APP_FIRST_USE_DATE = INI.ReadValue("device", "APP_FIRST_USE_DATE", "");//软件首次使用日期
        public static int OCR_USERD_TIMES = int.Parse(INI.ReadValue("device", "OCR_USERD_TIMES", "0"));//OCR已使用次数
        public static int APP_SAVE_SECONDS = int.Parse(INI.ReadValue("device", "APP_SAVE_SECONDS", "0"));//已节省时间（单位s）

        public static int AUDIO_VOLUME = int.Parse(INI.ReadValue("device", "AUDIO_VOLUME", "20"));//音频-音量

        public static int CAMERA_FOCUS_DISTANCE = int.Parse(INI.ReadValue("device", "CAMERA_FOCUS_DISTANCE", "0"));//相机焦距
        public static int CAMERA_FOCUS_DISTANCE_MAX = int.Parse(INI.ReadValue("device", "CAMERA_FOCUS_DISTANCE_MAX", "3000"));//相机-焦距最大值
        public static int CAMERA_EXPOSURE = int.Parse(INI.ReadValue("device", "CAMERA_EXPOSURE", "0"));//相机曝光
        public static int CAMERA_HEARTBEAT_INTEVAL= int.Parse(INI.ReadValue("device", "CAMERA_HEARTBEAT_INTEVAL", "5000"));//相机心跳监测频率（单位：毫秒）
        public static int LAMP_BRIGHTNESS = int.Parse(INI.ReadValue("device", "LAMP_BRIGHTNESS", "0"));//无影灯-亮度
        public static string LIGHT_SOURCE_COM = INI.ReadValue("device", "LIGHT_SOURCE_COM", "COM3");//无影灯光源-COM口
        public static int LIGHT_SOURCE_CHANNEL = int.Parse(INI.ReadValue("device", "LIGHT_SOURCE_CHANNEL", "1"));//无影灯光源-通道
        public static int LIGHT_SOURCE_LUMINOSITY_DEFAULT = int.Parse(INI.ReadValue("device", "LIGHT_SOURCE_LUMINOSITY_DEFAULT", "56"));//无影灯光源-亮度默认值

        public static int MOTOR_DEFAULT_SPEED = int.Parse(INI.ReadValue("device", "MOTOR_DEFAULT_SPEED", "800"));//#电机默认速度
        public static int MOTOR_MIN_SPEED = int.Parse(INI.ReadValue("device", "MOTOR_MIN_SPEED", "800"));//电机最低限速
        public static int MOTOR_MAX_SPEED = int.Parse(INI.ReadValue("device", "MOTOR_MAX_SPEED", "3000"));//电机最高限速

        public static int SPINE_MOTOR_SPEED_X = int.Parse(INI.ReadValue("device", "SPINE_MOTOR_SPEED_X", "800"));//电机速度-脊柱类-X轴
        public static int SPINE_MOTOR_SPEED_Y = int.Parse(INI.ReadValue("device", "SPINE_MOTOR_SPEED_Y", "800"));//电机速度-脊柱类-Y轴
        public static int TRAUMA_MOTOR_SPEED_X = int.Parse(INI.ReadValue("device", "TRAUMA_MOTOR_SPEED_X", "800"));//电机速度-创伤类-X轴
        public static int TRAUMA_MOTOR_SPEED_Y = int.Parse(INI.ReadValue("device", "TRAUMA_MOTOR_SPEED_Y", "800"));//电机速度-创伤类-Y轴

        /*public static int MOTOR_MANUAL_X_SPEED = int.Parse(INI.ReadValue("device", "MOTOR_MANUAL_X_SPEED", "800"));//电机手动速度-x
        public static int MOTOR_MANUAL_Y_SPEED = int.Parse(INI.ReadValue("device", "MOTOR_MANUAL_Y_SPEED", "800"));//电机手动速度-y
        public static int MOTOR_MANUAL_Z_SPEED = int.Parse(INI.ReadValue("device", "MOTOR_MANUAL_Z_SPEED", "800"));//电机手动速度-z*/

        public static string OCR_API_URL = INI.ReadValue("device", "OCR_API_URL", "");//OCR接口地址
        public static string OCR_APPID = INI.ReadValue("device", "OCR_APPID", "");//OCR_APPID
        public static string OCR_SECRET_CODE = INI.ReadValue("device", "OCR_SECRET_CODE", "");//OCR_SECRET_CODE
        public static int MAX_HARD_DISK_FREE_SPACE = int.Parse(INI.ReadValue("device", "MAX_HARD_DISK_FREE_SPACE", ""));//最大磁盘剩余容量（GB）
        public static string UPPER_DEVICE_NO = INI.ReadValue("device", "UPPER_DEVICE_NO", "");//上位机-(IE1在上位机系统中能识别的设备编码）
        public static string UPPER_SYSTEM_CODE = INI.ReadValue("device", "UPPER_SYSTEM_CODE", "");//上位机-系统编码
        public static string SERIVE_REPPORT_URL = INI.ReadValue("device", "SERIVE_REPPORT_URL", "");//数据上报接口地址（只有采用http通用方式上报的才走这里）
        public static string SERIVE_CHECKITEM_URL = INI.ReadValue("device", "SERIVE_CHECKITEM_URL", "");//找单核验接口地址（只有采用http通用方式上报的才走这里）
        public static string SERIVE_SUBMINT_RECEIPT_URL = INI.ReadValue("device", "SERIVE_SUBMINT_RECEIPT_URL", "");
        public static string SERIVE_PULL_ORDER_URL = INI.ReadValue("device", "SERIVE_PULL_ORDER_URL", "");
        public static string ALGORITHM_MODE = INI.ReadValue("device", "ALGORITHM_MODE", "RELEASE");//算法模式：DEBUG调试模式，RELEASE发布模式
        public static string SERIVE_SAASV2_DOMAIN = INI.ReadValue("device", "SERIVE_SAASV2_DOMAIN", "");//无境创新saas服务器地址


        public static string OCR_SERVICE_DOMAIN=INI.ReadValue("device", "OCR_SERVICE_DOMAIN", ""); //OCR与拉直服务器域名

        public static int OCR_MODEL= int.Parse(INI.ReadValue("device", "OCR_MODEL", "1"));//ocr模式 1：代表本地拉直ocr 2：服务端ocr
    }
}
